package cn.itcast.controller;

import cn.itcast.pojo.User;
import cn.itcast.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.sql.DataSource;

@RestController
@RequestMapping("hello")
public class HelloCotroller {
    @Autowired
    private UserService userService;

    @GetMapping("{id}")
    public User test(@PathVariable("id")long id){
        return userService.queryById(id);
    }
}
